Skip to content

fix: slack section limiting#4004

Merged
themarolt merged 2 commits intomainfrom
fix/slack-section-length
Apr 7, 2026
Merged

fix: slack section limiting#4004
themarolt merged 2 commits intomainfrom
fix/slack-section-length

Conversation

@themarolt
Copy link
Copy Markdown
Contributor

@themarolt themarolt commented Apr 7, 2026

Note

Low Risk
Low risk: changes only Slack notification block construction to avoid per-section length errors, though it could slightly alter message formatting/truncation for very long lines.

Overview
Fixes Slack Block Kit section length violations by introducing splitIntoSectionBlocks, which splits long message text into multiple section blocks at newline boundaries and hard-truncates any single line that exceeds the per-section character limit.

buildContentBlocks now uses this splitter for both plain-string content and titled SlackMessageSection content, reducing the chance of Slack rejecting oversized section blocks.

Reviewed by Cursor Bugbot for commit a4986c1. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings April 7, 2026 08:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts Slack notification formatting to better respect Slack’s per-section text limits by splitting long section content into multiple blocks.

Changes:

  • Introduces a conservative MAX_SECTION_TEXT limit for Slack section blocks.
  • Updates buildContentBlocks to split oversized section text at newline boundaries into multiple section blocks.
  • Simplifies the single-string content path to return a single section block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/libs/slack/src/notify.ts
Comment thread services/libs/slack/src/notify.ts Outdated
Signed-off-by: Uroš Marolt <uros@marolt.me>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@themarolt themarolt merged commit 7e42464 into main Apr 7, 2026
15 checks passed
@themarolt themarolt deleted the fix/slack-section-length branch April 7, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants